package com.vayne.lifecycle;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;

/**
 * @author xuerui.zhang
 * @since 2020/4/17 下午2:32
 */
public class AnnotatedBeanDefinitionDemo {

    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        AnnotatedBeanDefinitionReader definitionReader = new AnnotatedBeanDefinitionReader(beanFactory);
        definitionReader.register(AnnotatedBeanDefinitionDemo.class);
        AnnotatedBeanDefinitionDemo demo = beanFactory
                .getBean("annotatedBeanDefinitionDemo", AnnotatedBeanDefinitionDemo.class);
        System.out.println(demo);
    }
}
